package cn.elegent.tx.annotation;

import org.springframework.transaction.annotation.Transactional;

import java.lang.annotation.*;

/**
 * ElegentTX
 * @description 分布式消息分发的事务注解
 * @author
 * @date 2023/10/16 11:40
*/
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@Transactional(rollbackFor = Exception.class)
public @interface ElegentTx {

    //总事务名称
    String mainName() default "";
    //子事务名称
    String childName() default "";
}
